import Vue from "vue";
import { parseTime } from "@/utils/index";

// import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import "@/styles/tw.css";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

import "@/styles/index.scss"; // global css

import App from "./App";
import store from "./store";
import router from "./router";

import "@/icons"; // icon
import "@/permission"; // permission control

import "@/utils/rem";

import request from "@/utils/request";
Vue.prototype.axios = request;

Vue.use(ElementUI, { size: "small" });

Vue.filter("time2str", (time) => {
  return parseTime(time, "{y}-{m}-{d} {h}:{i}");
});

Vue.config.productionTip = false;

new Vue({
  el: "#app",
  router,
  store,
  render: (h) => h(App),
});
